package cc3002;

/**
 * This "Food" is just a suicidal method. You bite it, you die.
 * @author Anibal Llanos Prado
 *
 */
public class CyanidePill extends WeirdFood{
	
	/**
	 * Creates a mortal Cyanide Pill.
	 */
	public CyanidePill(){
		this.remainingBites=1;
		this.name="Cyanide Pill";
		this.caloriesPerBite=0;
	}
	
	/**
	 * Bites the food. This method is overridden to modify it behavior.
	 * @param health The Health State of the biter.
	 */
	@Override
	public int bite(HealthState health){
		assert remainingBites!=0:"Nothing to eat";
		--remainingBites;
		health.setState(0);
		return caloriesPerBite;
	}

}
